package com.atguigu.lease.web.app.vo.room;


import com.atguigu.lease.model.entity.ApartmentInfo;
import com.atguigu.lease.model.entity.LabelInfo;
import com.atguigu.lease.web.app.vo.graph.GraphVo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;
//因为jsonplugin用的是java的内审机制.hibernate
// 会给被管理的pojo加入一个hibernateLazyInitializer属性,
// jsonplugin会把hibernateLazyInitializer也拿出来操作,
// 并读取里面一个不能被反射操作的属性就产生了这个异常.
// 这个注解可以解决稀奇古怪的报错,主要是json生成一个handler, mybatisPlus无法解析
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
@Schema(description = "APP房间列表实体")
@Data
public class RoomItemVo {

    @Schema(description = "房间id")
    private Long id;

    @Schema(description = "房间号")
    private String roomNumber;

    @Schema(description = "租金（元/月）")
    private BigDecimal rent;

    @Schema(description = "房间图片列表")
    private List<GraphVo> graphVoList;

    @Schema(description = "房间标签列表")
    private List<LabelInfo> labelInfoList;

    @Schema(description = "房间所属公寓信息")
    private ApartmentInfo apartmentInfo;

}
